package c.e.a.b.b.k;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Binder;
import android.os.Process;
import c.e.a.b.b.j.d;

public class a {
    public final Context a;

    public a(Context context) {
        this.a = context;
    }

    public ApplicationInfo a(String str, int i) throws NameNotFoundException {
        return this.a.getPackageManager().getApplicationInfo(str, i);
    }

    public PackageInfo b(String str, int i) throws NameNotFoundException {
        return this.a.getPackageManager().getPackageInfo(str, i);
    }

    public boolean c() {
        if (Binder.getCallingUid() == Process.myUid()) {
            return d.e(this.a);
        }
        if (d.c()) {
            String nameForUid = this.a.getPackageManager().getNameForUid(Binder.getCallingUid());
            if (nameForUid != null) {
                return this.a.getPackageManager().isInstantApp(nameForUid);
            }
        }
        return false;
    }
}
